#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project : gtmsAutoTestProject 
@File    : print_device_list_server.py
@IDE     : PyCharm 
@Author  : Mario
@Date    : 2022/5/6 17:56 
@Describe: 打印机列表接口业务实现
"""
from Comm.tools.toolsControl import ToolsHandler
from APIs.middleApi.setup.printer.printer_manage_api import PrintManagerApi


def print_device_list(environment, brandCode) -> str:
    """
    打印机列表
    :param environment:环境
    :param brandCode:品牌编码
    :return:
    """
    middle_requests = PrintManagerApi(environment)
    device_list = middle_requests.pos_printer_manage_page(brandCode)
    device_data = ToolsHandler.get_json_result(device_list, '$.data.list')
    return device_data
